<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Lists extends CI_Controller {

	/**
	 * Index Page for this controller.
	 *
	 */
	public function index($string=NULL)
	{
		//$this->output->cache(1);
		//$this->output->enable_profiler(TRUE);                // 激活该分析器查看性能信息
		$data['stylesheet'] = '/theme/' ;
		$data['image_path'] = '/theme/images/' ;
		$data['head_title'] = '互联网网盘资源搜索-互联网网盘搜索引擎-盘享网' ;
		$data['keywords'] = '盘享，盘享网，网盘，云盘，互联网网盘，网盘分享' ;
		$data['description'] = '盘享网提供互联网网盘资源搜索和检索，促进资源的便捷获取和共享' ;

		$string = (strpos($string,'-')===0)?substr($string,1):$string ;
		$url_query = explode('-',$string) ;
		$tid = (int)!empty($url_query[0])?$url_query[0]:0 ;
		$page = (int)!empty($url_query[1])?$url_query[1]:0 ;

		$data['type_name'] = format_types($tid) ;
		$this->load->model('mrecords');  

		$data['lists'] = $this->mrecords->pagination($tid, $page, $data['totalcount'] ,22);
		$data['pagination'] = pagination('lists/index-'.$tid.'-%d',$page, $data['totalcount'],22);
		$data['hot'] = $this->mrecords->get_hot_all($tid);  

		$this->load->view('header',$data);
		$this->load->view('lists_index');
		$this->load->view('footer');
	}
}